package com.ruoyi.purchase.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.purchase.domain.Purchase;
import com.ruoyi.purchase.mapper.PurchaseMapper;
import com.ruoyi.purchase.service.PurchaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 黄佳成
* @description 针对表【po_purchase】的数据库操作Service实现
* @createDate 2022-01-06 09:55:16
*/
@Service
public class PurchaseServiceImpl extends ServiceImpl<PurchaseMapper, Purchase>
    implements PurchaseService{
    @Autowired
    private  PurchaseMapper purchaseMapper;
    @Override
    public List<Purchase> queryList(Purchase purchase) {
        return purchaseMapper.findAllBrand(purchase);
    }

    @Override
    public List<Purchase> queryListByStatus(Purchase purchase) {
        return purchaseMapper.queryListByStatus(purchase);
    }

    @Override
    public int deleteUserByIds(String ids) {
        String[] strings = Convert.toStrArray(ids);
        return purchaseMapper.deleteUserByIds(strings);
    }

    @Override
    public void updatPurchase(Integer userid,String bid) {
        purchaseMapper.updatPurchase(userid,bid);
    }

    @Override
    public Purchase findPurchase(String purId) {
        return purchaseMapper.findPurchase(purId);
    }

    @Override
    public boolean updatePurchaseby(Purchase purchase) {

        return purchaseMapper.updatePurchaseby(purchase);
    }
}




